package com.wxfire.mapper;

import com.wxfire.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("SELECT * FROM user")
    List<User> selectAll();

    @Insert("insert into user(name,pass) values(#{name},#{pass})")
    int insert(User user);

    @Update("update user set name=#{name},pass=#{pass} where id=#{id}")
    int update(User user);

    @Delete("delete from user where id=#{id}")
    int delete(long id);
}
